----------------------------------------------------------------------------------
      name:  <unnamed>
       log:  G:\My Drive\Research\CTC expansion\submission\ntj\stata replication f
> iles/output/figureA6.log
  log type:  text
 opened on:   3 Dec 2023, 18:19:01

. 
. version 16      

. 
. use "$data/ctctaxsim_mar0kid1.dta", clear

. append using "$data/ctctaxsim_mar0kid2.dta"
(label YEAR already defined)

. append using "$data/ctctaxsim_mar0kid3.dta"
(label YEAR already defined)

. tab depx

       depx |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |     20,000       33.33       33.33
          2 |     20,000       33.33       66.67
          3 |     20,000       33.33      100.00
------------+-----------------------------------
      Total |     60,000      100.00

. 
. sum fiitax earnings fedtaxlessctc v25 totctc

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
      fiitax |     60,000    623.6428    5520.775      -8855    14887.5
    earnings |     60,000      49.995    28.86775          0      99.99
fedtaxless~c |     60,000    3101.485    5519.867      -6431    14887.5
         v25 |     60,000    1.310576    1.883699          0      6.431
      totctc |     60,000    2.477842    1.684404          0          6

. replace earnings=earnings*1000
(59,994 real changes made)

. replace ctc=ctc*1000
(60,000 real changes made)

. replace v25=v25*1000
(26,824 real changes made)

. replace totctc=totctc*1000
(57,844 real changes made)

. sum fiitax earnings fedtaxlessctc v25 totctc

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
      fiitax |     60,000    623.6428    5520.775      -8855    14887.5
    earnings |     60,000       49995    28867.75          0      99990
fedtaxless~c |     60,000    3101.485    5519.867      -6431    14887.5
         v25 |     60,000    1310.576    1883.699          0       6431
      totctc |     60,000    2477.842    1684.404          0       6000

. 
. gen avgtaxrate=fiitax/earnings
(6 missing values generated)

. gen avgtaxrate2021=fedtaxlessctc/earnings       /* Don't include new CTC */
(6 missing values generated)

. 
. gen avgtaxeitc=-v25/earnings
(6 missing values generated)

. gen avgtaxctc=-totctc/earnings
(6 missing values generated)

. gen avgtaxctc2021=0

. 
. gen avgtaxeitcctc=avgtaxeitc+avgtaxctc
(6 missing values generated)

. 
. gen avginctax=avgtaxrate- avgtaxeitcctc
(6 missing values generated)

. 
. bysort depx: sum avgtax*

----------------------------------------------------------------------------------
-> depx = 1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
  avgtaxrate |     19,998   -.0384978    .1771239  -.4531434   .1488899
avgtaxr~2021 |     19,998    -.001552    .1565695       -.34   .1488899
  avgtaxeitc |     19,998   -.0699848    .1169049       -.34          0
   avgtaxctc |     19,998   -.0369458    .0281865  -.1183009          0
avgtaxc~2021 |     20,000           0           0          0          0
-------------+---------------------------------------------------------
avgtaxeitc~c |     19,998   -.1069306    .1362064  -.4531434          0

----------------------------------------------------------------------------------
-> depx = 2

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
  avgtaxrate |     19,998   -.1015125     .212742  -.5237579   .1312581
avgtaxr~2021 |     19,998   -.0376969    .1902841        -.4   .1387639
  avgtaxeitc |     19,998   -.1009697    .1511096        -.4          0
   avgtaxctc |     19,998   -.0638156    .0382265  -.1472367          0
avgtaxc~2021 |     20,000           0           0          0          0
-------------+---------------------------------------------------------
avgtaxeitc~c |     19,998   -.1647852    .1724027  -.5237579  -.0075058

----------------------------------------------------------------------------------
-> depx = 3

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
  avgtaxrate |     19,998   -.1426713    .2231151  -.5737579   .1111311
avgtaxr~2021 |     19,998   -.0578323    .2067233       -.45   .1286379
  avgtaxeitc |     19,998   -.1165602     .169402       -.45          0
   avgtaxctc |     19,998   -.0848389    .0436732  -.1786885          0
avgtaxc~2021 |     20,000           0           0          0          0
-------------+---------------------------------------------------------
avgtaxeitc~c |     19,998   -.2013992    .1846266  -.5737579  -.0175068


. 
. tab year avginctax if earnings==40000 & depx==1

    census |       avginctax
      year |     .0592    .067875 |     Total
-----------+----------------------+----------
      2017 |         0          1 |         1 
      2018 |         1          0 |         1 
-----------+----------------------+----------
     Total |         1          1 |         2 

. replace avginctax=avginctax*.04/.037875 if year==2017
(24,951 real changes made)

. tab year avginctax if earnings==40000 & depx==1

    census |       avginctax
      year |     .0592   .0716832 |     Total
-----------+----------------------+----------
      2017 |         0          1 |         1 
      2018 |         1          0 |         1 
-----------+----------------------+----------
     Total |         1          1 |         2 

. 
. bysort earnings depx: egen minavgtax=min(avgtaxrate)
(6 missing values generated)

. gen difavgtax2=avgtaxrate2021-minavgtax
(6 missing values generated)

. sum difavgtax2

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
  difavgtax2 |     59,994    .0798906    .0388303          0   .1786885

. 
. bysort earnings depx: egen maxavgtax=max(avgtaxrate)
(6 missing values generated)

. gen difavgtax=avgtaxrate2021-maxavgtax
(6 missing values generated)

. sum difavgtax

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   difavgtax |     59,994    .0438429    .0384686  -.0230193   .1443304

. 
. gen difavgtax3=minavgtax-maxavgtax
(6 missing values generated)

. drop if year==2017
(30,000 observations deleted)

. foreach var in difavgtax2 difavgtax difavgtax3{
  2.         replace `var'=-`var'
  3. }
(29,247 real changes made)
(29,100 real changes made)
(29,247 real changes made)

. 
. twoway line difavgtax2 earnings if year==2018 & depx==1, lp(-) pstyle(p1) || lin
> e difavgtax2 earnings if year==2018 & depx==2, lp(_) pstyle(p2) || line difavgta
> x2 earnings if year==2018 & depx==3, pstyle(p1) graphregion(color(white)) bgcolo
> r(white) leg(order(1 "1 Kid" 2 "2 Kids" 3 "3 Kids") c(1) pos(5) ring(0)) ytitle(
> "Change in Return to Work") xtitle("Earnings" "{bf:Panel A: 2021 vs 2020}") 

. graph save "$output/avgtax2unmar.gph", replace
(file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/avgtax2unmar.gph not found)
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication files/out
> put/avgtax2unmar.gph saved

. 
. 
. twoway line difavgtax earnings if year==2018 & depx==1, lp(-) pstyle(p1) || line
>  difavgtax earnings if year==2018 & depx==2, lp(_) pstyle(p2) || line difavgtax 
> earnings if year==2018 & depx==3, pstyle(p1) graphregion(color(white)) bgcolor(w
> hite) leg(order(1 "1 Kid" 2 "2 Kids" 3 "3 Kids") c(1) pos(5) ring(0)) ytitle("Ch
> ange in Return to Work") xtitle("Earnings" "{bf:Panel B: 2021 vs 2017}") 

. graph save "$output/avgtaxunmar.gph", replace
(file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/avgtaxunmar.gph not found)
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication files/out
> put/avgtaxunmar.gph saved

. 
. 
. twoway line difavgtax3 earnings if year==2018 & depx==1, lp(-) pstyle(p1) || lin
> e difavgtax3 earnings if year==2018 & depx==2, lp(_) pstyle(p2) || line difavgta
> x3 earnings if year==2018 & depx==3, pstyle(p1) graphregion(color(white)) bgcolo
> r(white) leg(order(1 "1 Kid" 2 "2 Kids" 3 "3 Kids") c(1) pos(2) ring(0)) ytitle(
> "Change in Return to Work") xtitle("Earnings" "{bf:Panel C: 2020 vs 2017}")  

. graph save "$output/avgtax3unmar.gph", replace
(file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/avgtax3unmar.gph not found)
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication files/out
> put/avgtax3unmar.gph saved

. 
. 
. graph combine "$output/avgtax2unmar.gph" "$output/avgtaxunmar.gph" "$output/avgt
> ax3unmar.gph",graphregion(color(white)) 

. graph export "$output/figureA6.png", replace
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/figureA6.png saved as PNG format

. 
. erase "$output/avgtax2unmar.gph"

. erase "$output/avgtaxunmar.gph"

. erase "$output/avgtax3unmar.gph"

. 
. log close
      name:  <unnamed>
       log:  G:\My Drive\Research\CTC expansion\submission\ntj\stata replication f
> iles/output/figureA6.log
  log type:  text
 closed on:   3 Dec 2023, 18:19:06
----------------------------------------------------------------------------------
